import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
    history: createWebHistory(),
    //控制滚动条的位置
    scrollBehavior() {
        return {
            left: 0,
            top: 0
        }
    },
    routes: [
        {
            path: '/home',
            component: () => import('@/pages/home/index.vue')
        },
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/hospital',
            component: () => import('@/pages/hospital/index.vue')
        }
    ]
})

export default router